<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>Help - Enhanced Spectral Diversity</title>


    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="../style.css">
</head>
<body>
<table class="header">
    <tbody>
    <tr class="header">
        <td class="header">&nbsp; Enhanced Spectral Diversity<br>
        </td>
        <td class="header" align="right"><a href="nbdocs://org.esa.snap.snap.help/org/esa/snap/snap/help/docs/general/overview/SnapOverview.html"><img src="../images/snap_header.jpg"
                                                                                 border="0"></a></td>
    </tr>
    </tbody>
</table>
<h3>Sentinel-1 Enhanced Spectral Diversity<br>
</h3>
<p class="MsoNormal"><span>
  This operator implements the Network Enhanced Spectral Diversity (NESD) method for TOPS coregistration [1]. It
  performs the joint coregistration of a Sentinel-1 stack by creating a network (graph) of images and then estimating
  range and azimuth offsets by solving an optimization problem.
  This operator estimates rigid azimuth and range offsets (i.e., constant for each image) with respect to a reference
  image considering the offsets of multiple secondary-secondary pairs.
  Note that, in this context, an <i>image</i> corresponds to the whole sub-swath of a split S-1 SLC.
</span></p>

<h4>Operation<br>
</h4>

<p class="MsoNormal"><span>
  NESD first creates a network of images in which nodes represent the images in the stack and
  arcs represent image-pair offsets (either range or azimuth). Then, rigid image offsets are computed by integrating the
  image-pair offsets.
</span></p>

<p class="MsoNormal"><span>
  For the <i>range integration network</i>, image-pair offsets are estimated by using incoherent cross-correlation. The
  estimation is done for each burst using a small block of data in the center of the burst. The estimates from all
  bursts are then averaged to get the final constant range offset for the whole&nbsp;</span><span>sub-swath</span><span>.<br>
</span></p>

<p class="MsoNormal"><span>
  For the <i>azimuth integration network</i>, image-pair offsets are estimated by using the Enhanced Spectral Diversity (ESD)
  method [2]. The ESD approach exploits the data in the overlap areas of adjacent bursts. The estimation is done
  for a number of windows in
  every overlap area and the final azimuth offset is obtained by one of the following two estimation methods:
  a <i>periodogram</i> or by <i>averaging</i> all the estimations. Both estimation methods are presented in [2].<br>
</span></p>

<p class="MsoNormal"><span>The integrated range and azimuth shifts are saved in both the metadata of the output product
	and in a pair of json files <b>[swath]_range_shifts.json</b> and <b>[swath]_azimuth_shifts.json</b>, where <b>[swath]</b>
    is the name of the corresponding swath for a stack. Also, azimuth shifts for each image pair are stored in
    ASCII files named with the suffix <b>_azimuth_shift.txt</b>. These files can be found in the user's
    <b>\.snap\var\log</b> directory. <br>
</span>
</p>

<p class="MsoNormal"><span>Finally, the operator applies range and azimuth shifts to every burst using the range
    and azimuth offsets estimated above.</span></p>


<h4>Input <br>
</h4>

<ul>
    <li>The input to this operator is the resulting product created by the S-1 Back Geocoding operator. It is a stack of
        coregistered reference and secondary images for the same sub-swath and same polarization (e.g. IW1 - VV). <br>
    </li>
</ul>


<h4>Output <br>
</h4>

<ul>
    <li>The output of the operator are the coregistered reference and secondary (I/Q) bands with the range and azimuth
        shift corrections applied to the secondary bands. <br>

    </li>
</ul>


<h4>Parameters <br>
</h4>
<ul>
    <!--  Cross-correlation -->
    <h5>Range estimation</h5>
    <li>Registration Window Width: Width of the sub-set of image used
        for cross-correlation. <br>
    </li>
    <li>Registration Window Height: Height of the sub-set of image used
        for cross-correlation. A larger window generally implies accurate
        estimation of the range shift and also means larger memory and longer
        processing time.
    </li>
    <li>Search Window Accuracy in Azimuth Direction: The search accuracy
        in azimuth direction for the maximum correlation. The search window
        height is 2*Acc.
    </li>
    <li>Search
        Window Accuracy in Range Direction: The search accuracy in range
        direction for the maximum correlation. The search window width is
        2*Acc. .
    </li>
    <li>Window Oversampling Factor: The oversampling factor for the
        search window. The larger the factor, the better the achievable
        accuracy, and the higher the computation cost.<br>
    </li>
    <li>Cross-Correlation Threshold: Threshold
        for normalized cross-correlation value. If the cross-correlation value
        is greater than the threshold, then the estimated range offset is
        considered valid, otherwise invalid.
    </li>

    <!-- ESD -->
    <h5>Azimuth estimation</h5>
    <li>Coherence
        Threshold for Outlier Removal: Pixels with coherence higher than the
        threshold are used for the azimuth shift estimation.<br>
    </li>
    <li>Number of Windows Per Overlap for ESD: The number of windows for azimuth offset estimation using ESD for each
        overlap area.
    </li>
    <li>ESD Estimator: Azimuth shift estimator. Either Average or Periodogram are available.
    </li>
    <li>Weight function: Weight function of the coherence to use for azimuth shift estimation.
        Weight for each pixel is computed as: <br>
        &emsp;<i>weight_function(coherence<sub>px</sub>)</i>
        if <i>coherence<sub>px</sub> > coherence_threshold</i>,
        <i>0</i> otherwise.</li>

    <!-- Integration network (NESD) -->
    <h5>Joint Coregistration</h5>
    <li>Temporal baseline type: Baseline type for building the integration network: number of images (default) or number
        of days.<br>
    </li>
    <li>Maximum temporal baseline: This parameter controls which arcs are considered as part of the network.
        In particular it sets the maximum number of days or images allowed between pairs of images to construct the
        network. Any number smaller than 1 will generate a network with all of the possible pairs.<br>
    </li>
    <li>Integration method: This is the procedure used to integrate the shifts. Available options are: L1, L2 or a
        combination of both (L1 and L2).<br>
    </li>

    <!--  Other-->
    <h5>Operator behavior</h5>
    <li>Do not write target bands: If the checkbox is selected, then the output product will not be written. However,
        range and azimuth shifts are exported to json files in the <b>\.snap\var\log</b> directory.
    </li>
    <li>Use user supplied shifts: If the checkbox is selected, then user supplied azimuth and range shifts will be used
        in the correction.&nbsp;
    </li>
    <li>The overall azimuth shift in pixels: The user provided azimuth shift in pixels. <br>
    </li>
    <li>The overall range shift in pixels: The user provided range shift in pixels. <br>
    </li>
</ul><br>
<img alt="" src="images/ESD.jpg"><br>


<h4>Execution Options</h4>

<p class="MsoNormal"><span>
    Depending on the amount of images available and your computational resources, there are two possible workflows for
    applying the joint coregistration.<br>
</span></p>


<h5>Sequential workflow (recommended for Desktop users)</h5>
<p class="MsoNormal"><span>
    First apply Back Geocoding. In the menu choose: <br>
    &emsp;<i>Radar > Coregistration > S1 TOPS Coregistration > S-1 TOPS Back Geocoding</i>.<br>
    Then apply Spectral Diversity. In the menu choose: <br>
    &emsp;<i>Radar > Coregistration > S1 TOPS Coregistration > S-1 TOPS Enhanced Spectral Diversity</i>.<br>
    This will produce a coregistered stack.
</span></p>

<p class="MsoNormal"><span>
    Options for ESD should be set as follows:<br>
    <img alt="" src="images/sequential_ESD.jpg"><br>
</span></p>


<p class="MsoNormal"><span>
    It is recommended to use the ProductSet-Reader in combination with Back Geocoding and Enhanced Spectral Diversity.
</span></p>

<p class="MsoNormal"><span>
    This method should be preferred for small stacks, where the meaning of small will depend on your computational resources.
    If your resources are not enough to (timely) complete the execution, you might want to try the distributed workflow.
</span></p>


<h5>Distributed workflow (recommended for Cloud deployments)</h5>

<p class="MsoNormal"><span>
This worklfow has two stages.
</span></p>

<h6>1. Compute range and azimuth shifts</h6>
<p class="MsoNormal"><span> For this stage, you have to execute Back Geocoding followed by Enhanced Spectral Diversity without writing the target bands. In the GUI
    you can do this through the menu: <br>
    &emsp;<i>Radar > Coregistration > S1 TOPS Coregistration > S-1 TOPS Joint Coregistration (write shifts to file)</i>.
    Make sure that the option <i>Do not write target bands</i> is selected:<br>
    <img alt="" src="images/distributed_ESD1.jpg"><br>
</span></p>

<p class="MsoNormal"><span>It is recommended to use a smaller tile size in the azimuth direction (i.e., the tile height) so that wasteful processing is minimized when Back Geocoding is applied to burst overlaps (note that we are assuming Back Geocoding and Enhanced Spectral Diversity are included in the same graph). For example, this can be configured when calling GPT by passing <b>-Dsnap.dataio.reader.tileWidth=500 -Dsnap.dataio.reader.tileHeight=75</b> as parameters.
</span></p>

<p class="MsoNormal"><span>If you are editing the graph' xml file, set <b>doNotWriteTargetBands</b> to <b>false</b>.
</span></p>


<p class="MsoNormal"><span>Once the Enhanced Spectral Diversity operator finishes, the range and azimuth shifts will be available in the
    <b>[swath]_range_shifts.json</b> and <b>[swath]_azimuth_shifts.json</b> files.
</span></p>


<h6>2. Apply range and azimuth shifts</h6>
<p class="MsoNormal"><span>
    Apply Back Geocoding and Enhanced Spectral Diversity for each reference-image specifying the range and azimuth shifts
    computed in stage 1. You can look them up in the <b>json</b> files. Please note that you must use the <b>same
    reference image as in stage 1</b>. In the, GUI you can specify the shifts as follows:<br>
    <img alt="" src="images/distributed_ESD2.jpg"><br>
</span></p>

<p class="MsoNormal"><span>If you editing the graph's xml file, set <b>useSuppliedRangeShift</b> and <b>useSuppliedAzimuthShift</b>
    to <b>true</b>; and <b>useSuppliedRangeShift</b> and <b>useSuppliedAzimuthShift</b> to the corresponding shifts.
</span></p>

<p class="MsoNormal"><span>
	Note that, as the application of shifts are independent for each reference-secondary pair, <b>stage 2</b> can be executed in parallel (in different processing nodes).
</span></p>


<h4>References</h4>

<ol>
    <li>H. Fattahi, P. Agram, and M. Simons. "A network-based enhanced spectral diversity approach for TOPS time-series
        analysis". In: IEEE Transactions on Geoscience and Remote Sensing, vol. 55, no. 2, pp. 777-786. February 2017.
        DOI:10.1109/TGRS.2016.2614925
    </li>
    <li>N. Yague-Martinez, P. Prats-Iraola, F. Rodriguez Gonzalez, R. Brcic, R. Shau, D. Geudtner, M. Eineder, and
        R. Bamler. "Interferometric Processing of Sentinel-1 TOPS Data". In: IEEE Transactions on
        Geoscience and Remote Sensing, vol. 54, no. 4, pp. 2220-2234, April 2016. ISSN:0196-2892.
        DOI:10.1109/TGRS.2015.2497902
    </li>
</ol>

<hr>
</body>
</html>
